<!-- 自定义底部菜单 -->
<template>
	<view>
		<u-tabbar :value="tabbarValue" @change="onChangeTabbar" :fixed="true" :placeholder="true" activeColor='#235EFF'
			:safeAreaInsetBottom="true">
			<u-tabbar-item text="首页" icon="home" name="home"></u-tabbar-item>
			<u-tabbar-item text="扫描" icon="scan" name="scanQRcode"></u-tabbar-item>
			<u-tabbar-item text="我的" icon="account" name="account"></u-tabbar-item>
		</u-tabbar>
		<u-notify ref="uNotifyRef"></u-notify>
	</view>
</template>

<script>
	import store from "@/store";
	export default {
		data() {
			return {
				tabbarValue: 'home',
			};
		},
		/*
		 * 生命周期函数--监听页面加载
		 */
		onLoad(options) {
			// 当前页面参数
		},

		methods: {
			// 	切换tabbar 事件
			onChangeTabbar(name) {
				switch (name) {
					case 'account':
						this.$refs.uNotifyRef.show({
							top: 10,
							type: 'primary',
							message: '暂未开放',
							duration: 1000 * 3,
							safeAreaInsetTop: true
						})
						break;

					case 'scanQRcode':
						this.$navTo(`pages/warehouse/outboundList`, {});
					default:
						break;
				}

			},
			scanCodeFun() {
				window.android.callScan();
			},
			//扫码数据回调
			callScanBack(result) {
			},
		}
	}
</script>

<style lang="scss">

</style>